const header = document.createElement('header');
const aside = document.createElement('aside');
const footer = document.createElement('footer');
const headTemplate = `
  <div class="logo">
    <img src="./images/logo.png" alt="">
    <span>选课管理系统</span>
  </div>
  <div class="head-right">
    <div class="top-nav-search">
      <form>
        <input type="text" class="form-control" placeholder="Search here">
        <button class="btn" type="submit">
          <i class="icon iconfont">&#xe67d;</i>
        </button>
      </form>
    </div>
  </div>
`
const asideTemplate = `
  <div class="sidebar-menu">
    <ul>
      <li class="menu-title"><span>Main Menu</span></li>
      <li class="submenu">
        <a href="">
          <i class="icon iconfont">&#xe674;</i>
          <span>首页</span>
        </a>
      </li>
      <li class="submenu active">
        <a href="">
          <i class="icon iconfont">&#xe675;</i>
          <span>课程管理</span>
          <span class="menu-arrow icon iconfont">
            &#xe665;
          </span>
        </a>
        <ul>
          <li>
            <a href="./list.html">课程信息 列表</a>
          </li>
          <li>
            <a href="./info.html">课程信息 查看</a>
          </li>
          <li>
            <a href="./add.html">课程信息 添加</a>
          </li>
          <li>
            <a href="./edit.html">课程信息 修改</a>
          </li>
        </ul>
      </li>
    </ul>
  </div>
`
const footerTemplate = `
  Copyright © 2022 By 沧州交通学院 — 软件工程2202（专升本）— 朱柄林
`
header.innerHTML = headTemplate;
aside.innerHTML = asideTemplate;
footer.innerHTML = footerTemplate;
document.body.appendChild(header);
document.body.appendChild(aside);
document.body.appendChild(footer);